<!DOCTYPE html>
<html lang="en" xmlns:zxw="http://www.w3school.com.cn" xmlns:njzxw="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="../js/common/layui/css/layui.css">
    <link rel="stylesheet" href="../css/common/animate.css"/>
    <link rel="stylesheet" href="../css/common/bootstrap/css/bootstrap.css"/>
    <link rel="stylesheet" href="../css/common/bootstrap/treeview/bootstrap-treeview.css"/>
    <link rel="stylesheet" href="../css/common/common.css"/>
    <style type="text/css">
        .layui-upload-drag img {
            width: 100px;
            height: 100px;
        }

        .layui-field-title {
            border-width: 1px;
            padding: 10px;
            border-radius: 5px;
        }
    </style>
</head>
<body class="layout-zxw">

<form action="" id="form1" class="layui-form layui-fluid" lay-filter="form1">
    <input type="hidden" id="id" name="id" value="">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>基本信息</legend>
        <div class="layui-field-box row">
            <zxw:input id="password" type="password" parcel="true" parcelName="原始密码" parcelclass="col-xs-12 col-sm-6"
                       inline="true" value="" maxlength="20" name="password" lay_verify="required" class=""></zxw:input>
        </div>
        <div class="layui-field-box row">
            <zxw:input id="password_new1" type="password" parcel="true" parcelName="新密码"
                       parcelclass="col-xs-12 col-sm-6" inline="true" value="" maxlength="20" name="password_new1"
                       lay_verify="required" class=""></zxw:input>
        </div>
        <div class="layui-field-box row">
            <zxw:input id="password_new2" type="password" parcel="true" parcelName="确认新密码"
                       parcelclass="col-xs-12 col-sm-6" inline="true" value="" maxlength="20" name="password_new2"
                       lay_verify="required" class=""></zxw:input>
        </div>
    </fieldset>
</form>

<script type="application/javascript" src="../js/common/own/own.js?layui,jquery,treeview,njzxw,URL">
    njzxw.layui.init();
    njzxw.layui.submit({
        url: URL.USER.CHANGEPASSWORD,
        fun: function (a, b) {
            if (b.state == 1) {
                njzxw.alert({
                    msg: b.msg,
                    fun: function (a) {
                        window.top.location.href = own.config.localhostPath + '/login.html';
                    }
                })
            } else {
                njzxw.alert({
                    msg: b.msg,
                    fun: function (a) {
                        a();
                        $('#layui-layer' + index_, window.parent.document).find('.layui-layer-btn0').removeClass('layui-disabled').find('i').remove();
                    }
                });
            }
        }
    });
</script>
</body>
</html>